<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/WEB-INF/templates/template.xhtml"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	>
	<ui:define name="content">
	
		<ui:include src="/includes/menu.xhtml"></ui:include>	
	
		<h1><h:outputText value="Můj Profil" /></h1>
		
		<ui:include src="/includes/menuTierTwo.xhtml"></ui:include>
	
		<h2><h:outputText value="Zprávy" /></h2>

		<ui:include src="/includes/messageMenu.xhtml"></ui:include>

		<h2><h:outputText value="Nová zpráva" /></h2>
		
		<h:outputText value="#{newMessageBean.errorMessage}" rendered="#{newMessageBean.errorMessageExists}" />
		
		<h:form>
		<h:panelGrid columns="2">
            <h:outputText value="To user:" />
            <h:inputText value="#{newMessageBean.toUser}" />
            
            <h:outputText value="Title:" />
            <h:inputText value="#{newMessageBean.title}" />
            
            <h:outputText value="Text:" />
            <h:inputText value="#{newMessageBean.text}" />
            
            <h:commandButton value="Send Message" action="#{newMessageBean.sendMessage()}"  />
        </h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>